package source

import org.apache.flink.api.scala._
import org.apache.flink.streaming.api.scala.{DataStream, StreamExecutionEnvironment}

/**
  * @Description: TODO QQ1667847363
  * @author: xiao kun tai
  * @date:2021/11/14 14:38
  */

object Source2_File {
  def main(args: Array[String]): Unit = {
    val env: StreamExecutionEnvironment = StreamExecutionEnvironment.getExecutionEnvironment

    env.setParallelism(1)
    val inputPath: String = "src/main/resources/sensor.txt"

    val stream2: DataStream[String] = env.readTextFile(inputPath)

    stream2.print()

    env.execute();


  }

}


